import { Login } from "@/types/login";
import { get, post, put } from "@/utils/request";
/**
 * 登录
 * @returns
 */
export const login = (data: Login.Form) => post<Login.LoginInfo>(`/user/login`, data, { headers: { login: true } });
/**
 * 退出登陆
 * @returns
 */
export const logout = () => get(`/user/logout`);
/**
 * 修改密码
 * @returns
 */
export const updatePwd = (data: Record<string, string>) => put(`/updatePwd`, data);
/**
 * 发送更改密码验证码
 * @param data
 * @returns
 */
export const sendUpdatePwdCode = () => get(`/sendUpdatePwdCode`);